﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cinema.DAL;

namespace Cinema.BLL
{
    public class FilmBLException : CinemaBLLException
    {
        public FilmBLException() { }
        public FilmBLException(string message) : base(message) { }
        public FilmBLException(string message, Exception inner) : base(message, inner) { }
    }
    public class FilmNotFoundException : FilmBLException
    {
        public string Name { get; set; }
        public string Director { get; set; }

        public FilmNotFoundException(string name, string director)
        {
            Name = name;
            Director = director;
        }

        public override string Message
        {
            get
            {
                return string.Format("The film: {0} directed by: {1} was not found", Name, Director);
            }
        }
    }
    public class FilmBL
    {
        protected IFilmFinder FilmFinder { get; set; }

        public FilmBL(IFilmFinder filmFinder)
        {
            FilmFinder = filmFinder;
        }

        public void Create(Film crtData)
        {

        }

        public void Update(FilmUniqueKey uk, Film updData)
        {
        }

        public bool IsExists(FilmUniqueKey uk)
        {
            return false;
        }
    }
}
